﻿using System;
using System.Collections.Generic;
using System.Text;

namespace KingOfCSharp.iHunter
{
    /// <summary>
    /// Present the interface of the message folder
    /// </summary>
    public interface IFolder
    {
        /// <summary>
        /// GUID of this folder.
        /// </summary>
        Guid Guid { get; }

        /// <summary>
        /// Gets or sets the name of the folder.
        /// </summary>
        /// <value>The name of the folder</value>
        string Name { get; set; }

        /// <summary>
        /// Gets or sets the settings of the folder.
        /// </summary>
        string Settings { get; set; }

        /// <summary>
        /// Gets the parent folder.
        /// </summary>
        /// <value>The parent folder if the folder is root, otherwise null.</value>
        IFolder Parent { get; }

        /// <summary>
        /// Gets the messages in the folders.
        /// </summary>
        /// <value>The messages.</value>
        ICollection<IMessage> MessageHeaders { get; }

        /// <summary>
        /// Gets the sub folders.
        /// </summary>
        /// <value>The sub folders.</value>
        ICollection<IFolder> SubFolders { get; }

        ///// <summary>
        ///// Deletes the folder.
        ///// </summary>
        //void DeleteSelf();

        ///// <summary>
        ///// Move the folder to another parent folder.
        ///// </summary>
        ///// <param name="destParent">The destination.</param>
        //void MoveTo(IFolder destParent);

        /// <summary>
        /// Determines whether this is the root folder.
        /// </summary>
        /// <returns>true if the folder is the root folder, otherwise false</returns>
        bool IsRoot { get; }


        /// <summary>
        /// Gets a value indicating whether this instance is special folder.
        /// </summary>
        /// <value>
        /// 	<c>true</c> if this instance is special folder; otherwise, <c>false</c>.
        /// </value>
        bool IsSpecialFolder { get; }

        /// <summary>
        /// Determines whether this folder is another folder's ancestor.
        /// </summary>
        /// <param name="item">The folder to compare.</param>
        /// <returns>True if this folder is the ancestor of <paramref name="item"/>, or the two folders are the same one, returns true; otherwise false</returns>
        bool IsAncestorOf(IFolder item);

        /// <summary>
        /// Gets the total message count.
        /// </summary>
        /// <value>The total count.</value>
        //int TotalCount { get; }
        /// <summary>
        /// Gets the unread message count.
        /// </summary>
        /// <value>The unread count.</value>
        //int UnreadCount { get; }
    }
}
